package com.sky.mapper;


import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface OrderDetailMapper {
    void insertBatch(ArrayList<OrderDetail> orderDetailList);

    /**
     * 根据订单id获取订单详情
     * @param ordersId
     * @return
     */
    @Select(("select * from order_detail where order_id = #{ordersId}"))
    List<OrderDetail> getByOrdersId(Long ordersId);
}
